<script>
  import config from './static/js/config.js'
  import helper from './static/js/helper.js'
  
  // 初始化录像代理
  import recorder from './static/js/videoRecordH5.js'

  
  
  export default {
    globalData: { 
      appName: '易鑫自助贷款',
      isAppInBackground: false,
    },
    onLaunch: function() {
      console.log('App Launch') 
      recorder.init() 
      
      if (config.logToFile) {
        console.log = (function(logFunc) {
          return function() {
            window.api?.log(...arguments);
            logFunc(...arguments) 
          }
        })(console.log); 
      }
    },
    onShow: function() {
      // console.log('App Show')
      this.globalData.isAppInBackground = false 
      uni.$emit('Evt_AppShow') 
    },
    onHide: function() {
      // console.log('App Hide')
      this.globalData.isAppInBackground = true 
      uni.$emit('Evt_AppHide') 
    }
  }
</script>

<style>
  /*每个页面公共css */
</style>
